<template xmlns="http://www.w3.org/1999/html">
  <div class="app-container">
    <div class="account-detail">
      <div class="prop-item">
        <div class="prop-name">商户id</div>
        <div class="prop-value">{{ accountInfo.id }}</div>
      </div>

      <div class="prop-item">
        <div class="prop-name">商户名称</div>
        <div class="prop-value">{{ accountInfo.name }}</div>
      </div>

      <div class="prop-item">
        <div class="prop-name">账号类型</div>
        <div class="prop-value">{{ accountInfo.type==1?"员工账号":"商户超级管理员" }}</div>
      </div>

      <div class="prop-item">
        <div class="prop-name">手机号</div>
        <div class="prop-value">{{ accountInfo.mobile }}</div>
      </div>

      <div class="prop-item">
        <div class="prop-name">地址</div>
        <div class="prop-value">{{ accountInfo.province?(accountInfo.province+accountInfo.city+accountInfo.district+accountInfo.addr):"未填写" }}</div>
      </div>

      <div class="prop-item">
        <div class="prop-name">注册时间</div>
        <div class="prop-value">{{ parseTime(accountInfo.create_time, '{y}-{m}-{d} {h}:{i}') }}</div>
      </div>

      <!-- 实名认证信息 -->
      <!--      <div class="">认证信息</div>-->

      <div class="prop-item">
        <div class="prop-name">认证类型</div>
        <div class="prop-value">{{ accountInfo.auth_type==2?"企业认证":accountInfo.auth_type==1?"个人认证":"未认证" }}</div>
      </div>

      <div v-if="accountInfo.auth_type>0" class="prop-item">
        <div class="prop-name">认证名称</div>
        <div class="prop-value">{{ accountInfo.auth_name }}</div>
      </div>

      <div v-if="accountInfo.auth_type==2" class="prop-item">
        <div class="prop-name">企业名称</div>
        <div class="prop-value">{{ accountInfo.comp_name }}</div>
      </div>

      <div v-if="accountInfo.auth_type==2" class="prop-item">
        <div class="prop-name">营业执照</div>
        <div class="prop-value">{{ accountInfo.business_license_no }}</div>
      </div>

      <div v-if="accountInfo.auth_type==1" class="prop-item">
        <div class="prop-name">真实姓名</div>
        <div class="prop-value">{{ accountInfo.person_name }}</div>
      </div>

      <div v-if="accountInfo.auth_type==1" class="prop-item">
        <div class="prop-name">证件号</div>
        <div class="prop-value">{{ accountInfo.id_card_no }}</div>
      </div>
    </div>
  </div>
</template>

<script>

import accountApi from '@/api/account'

export default {
  name: 'AccountInfo',
  components: {},
  dicts: [],
  data() {
    return {
      accountInfo: {}
    }
  },

  created() {
    if (this.$route.query.order_id) {
      this.orderId = this.$route.query.order_id
    }

    accountApi.getAccountInfo().then(res => {
      if (res.code == 0 && res.data) {
        this.accountInfo = res.data
      }
    })
  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
.account-detail{
  a{
    color: #181818;
  }
  padding: 10px;
  width: 50%;
  .main-title{
    text-align: center;
    font-size: 24px;
  }
  .sub-title{
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #9b9999;
  }
  .order-detail-attribute{
    margin-top: 20px;
  }
  .prop-item{
    display: flex;
    justify-content: space-between;
    min-height: 35px;
    line-height: 35px;
    .prop-name{
      text-align: left;
      color: #9b9999;
      font-size: 14px;
    }
    .prop-value{
      font-size: 14px;
    }
  }
}

@media (max-width: 800px) {
  .app-container{
    .account-detail{
      width: 100%;
      .prop-item{
        display: flex;
        min-height: 45px;
        line-height: 45px;
        border-bottom: 1px solid #F0F0F0;
        .prop-value{
          display: flex;
          align-items: center;
        }

        .icon{
          margin-left: 5px;
        }
      }
    }
  }
}

</style>
